<!DOCTYPE html>
<html>
<head>
  <title>Pragprog Books Online Store</title>
  <%= stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true %>
  <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
  <%= csrf_meta_tags %>
</head>
<body id="store">
  <div id="banner">
    <%= image_tag "logo.png" %>
    <%= @page_title || "Pragmatic Bookshelf" %>
  </div>
  <div id="columns">
    <div id="side">
      <% if @cart %>
        <%= hidden_div_if(@cart.line_items.empty?, { id: "cart" }) do %>
          <%= render @cart %>
        <% end %>
      <% end %>

      <a href="/">Home</a><br />
      <a href="/">Questions</a><br />
      <a href="/">News</a><br />
      <a href="/">Contact</a><br />
    </div>
    <div id="main">
      <%= yield %>
    </div>
  </div>
</body>
</html>
